package com.introduce.extract;

import preserve.extract.HeatingPlan;
import preserve.extract.TempRange;

/**
 * 改为传递整个对象
 *
 * @author: cong zhi
 * @createDate: 2022/5/10 9:10
 * @updateUser: cong zhi
 * @updateDate: 2022/5/10 9:10
 * @updateRemark: 修改内容
 * @version: v1.0
 */

public class Room {

    public boolean withinPlan(HeatingPlan plan) {
        int low = daysTempRange().getLow();
        int high = daysTempRange().getHigh();
        return plan.withinRange(low, high);
    }

    public TempRange daysTempRange() {
        return new TempRange();
    }


}
